package com.zth.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.zth.mapper.UserMapper;
import com.zth.pojo.User;
import com.zth.service.UserService;

@Service
@Transactional
public class UserServiceImpl implements UserService{
	@Autowired
	private UserMapper userMapper;
	
	@Override
	public User loginByNameAndPassword(User user) {
		
		return userMapper.loginByNameAndPassword(user);
	}

	@Override
	public User findById(int id) {
		
		return userMapper.findById(id);
	}

	@Override
	public int deitPassowrd(User user) {
		// TODO Auto-generated method stub
		return userMapper.deitPassowrd(user);
	}

}
